// 得到数据
function myajax(url, data = {}, type = 'get') {
    return new Promise((resolve, reject) => {
        $.ajax({
            url,
            data,
            type,
            dataType: 'json',
            success(res) {
                resolve(res)
            },
            error(e) {
                reject(e)
            }

        })
    })
}